<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
    <script th:src="@{/node_modules/jquery/dist/jquery.min.js}"></script>

</head>
<body>
<button>a</button>
</body>
<script type="text/javascript">
    $('button').click(function () {
        obj = {
            'password':'adsfsdfs',
            'name':'zhao',
            _method:'put',
        };
$.post({
    url:'/user?_method=PUT',
    contentType:"application/json",
    dataType:'json',
    data:JSON.stringify(obj),
    success:function (data) {
        console.log(data);
    }
})
    })
</script>
</html>